package com.njust.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.njust.domain.dto.TestPageQueryDTO;
import com.njust.domain.po.TestPerson;
import com.njust.domain.vo.TestPageQueryPersonVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TestPersonMapper extends BaseMapper<TestPerson> {
    /**
     * 分页查询
     * @param testPageQueryDTO
     * @return
     */
    public Page<TestPageQueryPersonVO> pageQuery(TestPageQueryDTO testPageQueryDTO);
    
    @Select("select test_person.test_person_id,user.uName,product.category,project.project_name,product.product_name,project.standard_number,test_person.test_time,test_person.completion_date from test_person inner join user on test_person.uId = user.uId inner join project on project.project_id = test_person.project_id inner join product on project.product_id = product.product_id where test_person.project_id = #{project_id};")
    public List<TestPageQueryPersonVO> pageQueryById(int project_id);
}
